package com.sleepcamel.resteasyConfigurator.util;

import java.util.HashSet;
import java.util.Set;

public class DatabaseConnectionProvider {

	private static DatabaseConnectionProvider instance;
	private static Set<DatabaseEngineOption> driversSet;

	private DatabaseConnectionProvider(){
		driversSet = new HashSet<DatabaseEngineOption>();
		driversSet.add(new DatabaseEngineOption("Postgres", "8.4-701.jdbc4", "org.postgresql.Driver"));
		driversSet.add(new DatabaseEngineOption("MySQL", "5.1.6", "com.mysql.jdbc.Driver"));
	}
	
	public static DatabaseConnectionProvider getInstance(){
		if ( instance == null ){
			instance = new DatabaseConnectionProvider();
		}
		return instance;
	}

	public DatabaseEngineOption[] getDrivers() {
		return driversSet.toArray(new DatabaseEngineOption[]{});
	}
}
